'''
Created on 10/05/2010

@author: Daniel
'''

from Scheduler import Scheduler
import queue

class Priority(Scheduler):
    '''
    classdocs
    '''

    def __init__(self,aSO):
        self.SO = aSO
        self.readyQueue= queue.PriorityQueue()
        #self.SO.setReadyQueue(self.readyQueue) # alSO le paso la cola como parametrodef __init__(self):

    def addPCB(self,aPCB,aQueue): #se viene double dispatching
        x=aPCB.getPriority()
        aQueue.put((x,aPCB))
               
    def nextPCB(self):
        tupla = self.readyQueue.get()
        return tupla[1]
        